package com.example.myapplication.bean;

import android.content.Context;

import com.example.myapplication.R;

import org.androidannotations.annotations.EBean;
import org.androidannotations.annotations.RootContext;

@EBean
public class PersonBean {
    @RootContext
    Context context;
    private String username;
    private String password;
    private String extra;
    // 使用EBean 需要无参的构造函数
    public PersonBean() {

    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        extra = context.getResources().getString(R.string.string_extra);
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "PersonBean{" +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", extra='" + extra + '\'' +
                '}';
    }
}
